Ext.define('AmpleHarvest.objects.Statistics.button.cExportGrid',
		{
			extend	: 'Ext.button.Button',
			alias	: 'widget.metricsviewer-view-buttons-exportgrid',

			text	: 'Export',

			handler	: function()
			{
				var params, paramsClone;
				params = this.getGrid().getStore().getLastRequestNoLimit();

				MetricsViewer.util.Export.exportPostWithParams(this.getGrid()
								.getCsvUrl(), params);
			},

			getGrid	: function()
			{
				if (!this.grid)
				{
					this.grid = this.up('gridpanel');
				}
				return this.grid;
			}
		});